package com.example.mock.mockstatic;

import com.example.postman.restful.entity.User;

public class MockStatic {

    public static User getUser(User user) {
        if (user.getOprationCode().equals("123")) {
            user.setUserName("admin");
        } else if (user.getOprationCode().equals("456")) {
            user.setUserName("admin");
            user.setAreaCode("1122222");
        } else {
            throw new RuntimeException("the user is not exist!");
        }
        return user;
    }
}
